import { queryCodeAll } from '@/services/dataDict';
import DataDictUtils from '@/utils/DataDictUtils';

const DataDictModel = {
    namespace: 'dict',
    state: {
      dictCodes: [],
    },
    effects: {
      *fetch(_, { call, put }) {
        const response = yield call(queryCodeAll);
        if(response.result===1){
            DataDictUtils.setDictCode(response.returnValue);
        }
      },
    },
    reducers: {

    },
  };
  export default DataDictModel;